package org.wdcode.core.thread;

import java.util.TimerTask;

/**
 * TimerTask的封装,主要是把Runnable接口转换成TimerTask
 * @author WD
 * @since JDK6
 * @version 1.0 2010-01-25
 */
public final class BasicTimerTask extends TimerTask {
	// Runnable接口
	private Runnable	runnable;

	/**
	 * 构造参数
	 * @param runnable Runnable接口
	 */
	public BasicTimerTask(Runnable runnable) {
		this.runnable = runnable;
	}

	/**
	 * 运行方法
	 */
	public void run() {
		runnable.run();
	}
}
